import request from "@/utils/request";

export const insert = (data) => {
  return request({
    url: "/api/clientAddress/insert",
    method: "post",
    data,
  });
};
export const update = (data) => {
  return request({
    url: "/api/clientAddress/update",
    method: "post",
    data,
  });
}; 

export const getUserAddresses = () => {
  return request({
    url: "/api/clientAddress/getUserAddresses",
    method: "post",
  });
};

export const deleteAddress = (id) => {
  return request({
    url: "/api/clientAddress/delete",
    method: "post",
    params: { id },
  });
};

export const setDefault = (id) => {
  return request({
    url: "/api/clientAddress/setDefault",
    method: "post",
    params: { id },
  });
};

